package com.test4.bean;

import com.test4.ex.SecurityException;

/**
 * 防盗门
 *
 * @author Cc
 * 2024-03-12
 */
public class SecurityDoor extends Door {

    @Override
    void open() {
        System.out.println("开门");
    }

    @Override
    void close() {
        System.out.println("关门");
    }

    /**
     * 防盗功能
     */
    void Security() {
        try {
            throw new SecurityException();
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        }
    }
}
